package com.web.cms.pan.message;

import com.blue.core.dict.State;
import com.blue.core.dict.UploadType;
import com.blue.validation.group.GetModel;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 目录文件请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2018年04月09日
 */
 public class FolderFileRequest implements Serializable
{
	private static final long serialVersionUID = 1L;

	@NotNull(groups = { UpdateModel.class, GetModel.class}, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id; // 编号
	@NotNull(groups = { SaveModel.class }, message = "目录编号不能为空")
	private Integer folderId; // 目录编号
	@NotNull(groups = { SaveModel.class }, message = "文件数据编号不能为空")
	private Integer fileDataId; // 文件数据编号
	@NotNull(groups = { SaveModel.class, UpdateModel.class, GetModel.class }, message = "用户编号不能为空")
	private Integer userId; // 用户编号
	@NotBlank(groups = {SaveModel.class, UpdateModel.class}, message = "文件名称不能为空")
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "文件名称长度[0-200]")
	private String name; // 文件名称
	private String key; // 文件标识
	private Date createTime; // 创建时间
	private Date deleteTime; // 删除时间
	private Integer fileSize; // 文件大小
	private UploadType type; // 文件类型
	@NotNull(groups = { GetModel.class }, message = "状态不能为空")
	private State state; // 状态：0正常，1作废
	
	public FolderFileRequest()
	{
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Integer getFolderId()
	{
		return folderId;
	}

	public void setFolderId(Integer folderId)
	{
		this.folderId = folderId;
	}

	public Integer getFileDataId()
	{
		return fileDataId;
	}

	public void setFileDataId(Integer fileDataId)
	{
		this.fileDataId = fileDataId;
	}

	public Integer getUserId()
	{
		return userId;
	}

	public void setUserId(Integer userId)
	{
		this.userId = userId;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getDeleteTime()
	{
		return deleteTime;
	}

	public void setDeleteTime(Date deleteTime)
	{
		this.deleteTime = deleteTime;
	}

	public State getState()
	{
		return state;
	}

	public void setState(State state)
	{
		this.state = state;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getKey()
	{
		return key;
	}

	public void setKey(String key)
	{
		this.key = key;
	}

	public Integer getFileSize()
	{
		return fileSize;
	}

	public void setFileSize(Integer fileSize)
	{
		this.fileSize = fileSize;
	}

	public UploadType getType()
	{
		return type;
	}

	public void setType(UploadType type)
	{
		this.type = type;
	}
}
